<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>品优购首页</title>
    <!-- 引入第3方辅助插件css -->
    <link rel="stylesheet" href="./lib/fontawesome/css/font-awesome.css">
    <link rel="stylesheet" href="./lib/mui/css/mui.css">
    <!-- 引入公共样式css -->
    <link rel="stylesheet" href="./css/comment.css">
    <!-- 引入当前页面样式css -->
    <link rel="stylesheet" href="./css/index.css">
</head>

<body>
    <!-- 页面顶部 -->
    <header class="pyg_header">
        <div class="mui-input-row mui-search">
            <input type="search" class="mui-input-clear" placeholder="">
        </div>
    </header>

    <!-- 主体内容 -->
    <div class="pyg_main">
        <!-- 轮播图 -->
        <div class="pyg_banner">
            <!-- 轮播图模板 占位 -->
        </div>

        <!-- 分类导航 -->
        <div class="pyg_categorys">
            <!-- 分类导航模板 占位 -->
        </div>

        <!-- 商品预览显示 -->
        <div class="pyg_goods">
            <!-- 商品预览显示模板 占位 -->
        </div>
    </div>

    <!-- 页面底部 -->
    <footer class="pyg_footer">
        <a href="javascript:;">
            <span class="fa fa-home"></span>
            <div>首页</div>
        </a>
    
        <a href="./page/category.html">
            <span class="fa fa-list-ul"></span>
            <div>分类</div>
        </a>
    
        <a href="javascript:;">
            <span class="fa fa-shopping-cart "></span>
            <div>购物车</div>
        </a>
    
        <a href="javascript:;"><span class="fa fa-user-circle-o"></span>
            <div>我的</div>
        </a>
</footer>
</body>

</html>
<!-- 引入第3方辅助插件js -->
<script src="./lib/mui/js/mui.min.js"></script>
<!-- 引入zepto.js -->
<script src="./lib/zepto/zepto.js"></script>
<!-- 引入模板引擎 -->
<script src="./lib/arttemplate/template-web.js"></script>
<!-- 引入公共js -->
<script src="./js/comment.js"></script>
<!-- 引入当前页面的js -->
<script src="./js/index.js"></script>

<!-- ** template模板 ** -->
<!-- 轮播图 -->
<script type="text/template" id="swiperTpl">
    <div class="mui-slider">
        <div class="mui-slider-group mui-slider-loop">
            <!--支持循环，需要重复图片节点 -->
            <div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img src="{{data[data.length-1].image_src}}" /></a></div>
            {{each data value index }}
            <div class="mui-slider-item"><a href="#"><img src="{{value.image_src}}" /></a></div>
            {{/each}}
            <!--支持循环，需要重复图片节点 -->
           <div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img src="{{data[0].image_src}}" /></a></div>
        </div>
        <div class="mui-slider-indicator">
            {{each data value index}}
            <div class="mui-indicator {{ index ==0 ? 'mui-active':''}}"></div>
            {{/each}}
        </div>
    </div>
</script>

<!-- 分类导航 -->
<script type="text/template" id="categTpl">
    {{each data value index}}
    <a href="javascript:;"><img src="{{value.image_src}}" alt="{{value.name}}"></a>
    {{/each}}
</script>

<!--  商品预览显示  -->
<script type="text/template" id="goodsTpl">
    {{each data value1 index1}}
    <div class="goods_item">
        <!-- 商品主题类大图 -->
        <img src="{{value1.group_img}}" alt="">
        <!-- 商品显示列表 -->
        <ul>
            {{each value1.goods value2 index2}}
            <li>
                <a href="javascript:;">
                    <img src="{{value2.goods_small_logo}}"
                        alt="">
                    <div>{{value2.goods_name}}</div>
                    <span>￥{{value2.goods_price}}</span>
                </a>
                <a href="./page/goods_list.html?cid={{value2.cat_id}}" class="find_like mui-btn mui-btn-primary mui-btn-outlined">找相似</a>
            </li>
            {{/each}}
        </ul>
    </div>
    {{/each}}
</script>